package com.weixin.base.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.weixin.base.dao.RoleDao;
import com.weixin.base.dao.TpDao;
import com.weixin.base.service.TpService;

@Service("tpService")
public class TpServiceImpl implements TpService {

	@Autowired
	private TpDao tpDao;
	
	public int selectTemplateId(int userId){
		return tpDao.selectTemplateId(userId);
	}
	
	/**
	 * 查询首页菜单
	 * 
	 * @param userId
	 * @param type：类型1幻灯片图片2菜单图片
	 * @return
	 */
	public List<Map<String, Object>> selectTbWxMenu(int userId, int type){
		return tpDao.selectTbWxMenu(userId, type);
	}
	
	/**
	 * 返回文章页 srandom 文章随机码
	 */
	public String selectTbWxText(int userId,String srandom){
		return tpDao.selectTbWxText(userId, srandom);
	}
}
